package com.project_test.kun.travelling_1st.SplashPage;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.project_test.kun.travelling_1st.MainActivity;
import com.project_test.kun.travelling_1st.R;

/**
 * A simple {@link Fragment} subclass.
 */
public class Splash_One_page_Fragment extends Fragment {

  private  Intent intent;
    public Splash_One_page_Fragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        intent=new Intent(getActivity(),MainActivity.class);
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                startActivity(intent);
                getActivity().finish();
            }
        }).start();
        return inflater.inflate(R.layout.fragment_splash__one_page_, container, false);
    }
}


